home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 2 / BBS in a box - Trilogy II.iso / Files / Hyper / I-J / If Monks had Macs... / Library / Library / background_2653.txt next >
Encoding:
Text File  |  1992-02-10  |  4.0 KB  |  141 lines

  1. -- background: 2653 from stack: in
  2. -- bmap block id: 2389
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   if mouseH() < 20 and mouseV() < 20 then
  9.     show menuBar
  10.     exit mouseUp
  11.   else
  12.     hide menuBar
  13.   end if
  14.   cleanScreen
  15.   if name of target contains "card button" then
  16.     if shiftKey() is down then
  17.       get checkMod()
  18.       if it is "OK" then exit mouseUp
  19.       answer "Remove this volume from the library?" with "Yes" or "No"
  20.       if it is "No" then
  21.       end if
  22.       if it is "Yes" then
  23.         if short name of target is in "Desktop,Home,the stack you want" then
  24.           beep
  25.           answer "‚ÄúDesktop‚Äù, ‚ÄúHome‚Äù, and ‚ÄúStackFinder‚Äù are chained to" &" the bookshelf and can't be removed."
  26.           exit mouseUp
  27.         end if
  28.         set name of target to "?"
  29.         get rect of target
  30.         put item 1 of it & "," &item 2 of it into temp
  31.         put item 3 of it & "," &item 4 of it into temp2
  32.         choose  select tool
  33.         drag from temp to temp2
  34.         doMenu "Clear Picture"
  35.         choose browse tool
  36.       end if
  37.       exit mouseUp
  38.     end if
  39.     if short name of target is "?" then
  40.       get checkMod ()
  41.       if it is "OK" then exit mouseUp
  42.       answer "This book needs a title." with "Entitle it..." or "Cancel."
  43.       if it is "Entitle it..." then
  44.         set cursor to 3
  45.         put line 1 of CustomFileName("STAK","Please choose a title for this book:") into FName
  46.         lock screen
  47.         unlock screen
  48.         if  FName is not empty then
  49.           set cursor to 3
  50.           repeat with i = length of FName down to 1
  51.             if char i of Fname is not ":" then
  52.               put char i of fname before FNameTemp
  53.             else
  54.               exit repeat
  55.             end if
  56.           end repeat
  57.         else
  58.           exit mouseUp
  59.         end if
  60.         lock screen
  61.         show cd fld 1
  62.         set name of target to FNameTemp
  63.         put FNameTemp into cd fld 1
  64.         select line 1 of cd fld 1
  65.         doMenu "Copy Text"
  66.         hide cd fld 1
  67.         choose select tool
  68.         set textSize to 9      -- can't be much larger
  69.         set textFont to geneva -- font of the title
  70.         set textStyle to plain -- style of the title
  71.         doMenu "Paste Text"
  72.         doMenu "Rotate Right"
  73.         doMenu "Transparent"
  74.         get loc of target
  75.         drag from 254,169 to it
  76.         show tool window at 439,33
  77.         exit mouseUp
  78.       else
  79.         exit mouseUp
  80.       end if
  81.     end if
  82.     set cursor to 3
  83.     if short name of target is "Home" then
  84.       GoHome
  85.     else
  86.       if short name of target is "DeskTop" then
  87.         answer "Quit HyperCard?" with "Yes" or "No"
  88.         if it is "Yes" then
  89.           doMenu "Quit HyperCard"
  90.         else
  91.           exit mouseUp
  92.         end if
  93.       else
  94.         if short name of target is "AddButton" then
  95.           AddButton
  96.         else
  97.           if short name of target is not "the stack you want" then
  98.             get short name of target
  99.             visual zoom open
  100.             do "go stack " &it
  101.             if result() is empty then
  102.             else
  103.               beep
  104.               answer "There is no stack with that name currently on line." &" The book you clicked on might be mis-named. Please " &"rename it and try again."
  105.               lock screen
  106.               unlock screen with zoom close
  107.             end if
  108.             exit mouseUp
  109.           else
  110.             get short name of target
  111.             visual zoom open
  112.             do "go stack " &it
  113.             if result() is empty then
  114.             else
  115.               beep
  116.               answer "You clicked on the cancel button."
  117.               lock screen
  118.               unlock screen with zoom close
  119.             end if
  120.             exit mouseUp
  121.           end if
  122.         end if
  123.       end if
  124.     end if
  125.   else
  126.     pass mouseUp
  127.   end if
  128. end mouseUp
  129.  
  130. function checkMod
  131. if cantmodify of this stack is true then
  132.   beep
  133.   answer "Can't modify this stack." &return &"Select Protect Stack from the File menu and" &return &"unprotect it or move stack to unlocked disk."
  134.   show menuBar
  135.   return it
  136. end if
  137. end checkMod
  138.  
  139. on arrowKey
  140. end arrowKey
  141.